package SellCar.controller;

import java.util.List;


import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.scripting.xmltags.ForEachSqlNode;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import SellCar.pojo.Buy;
import SellCar.service.impl.BuyBizImpl;
@Controller("likeController")
public class LikeController {
	@Autowired
	@Qualifier("buyBizImpl")
	private BuyBizImpl biz;
	Logger logger = Logger.getLogger(LikeController.class);
	ModelAndView mav = new ModelAndView();
	@RequestMapping(value="/likeCar.html")
	public ModelAndView likeCar(@RequestParam("name")String CarName){
		List<Buy> like = biz.getCarInfo(CarName);
		mav.addObject("carInfo", like);
		mav.setViewName("likeCar");
		return mav;
	}
	
}
